package com.findme.uteis;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class UteisApp {
	
	public static int converterIntPoint(Double d){
		return (int)(d * 1e6);
		}	
	
	public static Date converterStringData(String sDate){

		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

		try {
		return sdf.parse(sDate);
		} catch (ParseException e) {
		return null;
		}
		}

		public static Date converterStringDataDefault(String sDate){

		SimpleDateFormat dateFormat = new SimpleDateFormat("hh:mm:ss dd/MM/yyyy");



		try {
		return dateFormat.parse(sDate);
		} catch (ParseException e) {
		return null;
		}
		}

		public static String formatarData(Date date){

		SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss dd/MM/yyyy");	
		return sdf.format(date);
		}	

}
